%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/polymorphic.relay.custom_delete"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 7, 36, 37, 112, 116, 120, 124, 128, 138, 139, 6, 9, 38, 54, 137, 14<br />2: 13, 17, 21, 25, 29<br />ᐳ: 15, 19, 23, 27, 31, 32, 33, 34<br />3: PgSelect[35]<br />4: PgSelectRows[40]<br />ᐳ: 39, 41, 42, 48"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 38, 48, 54, 139, 2, 4, 112, 116, 120, 124, 128<br /><br />1: PgSelect[44]<br />2: PgSelectRows[50]<br />ᐳ: 49, 51, 52, 53"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 139, 44, 2, 53, 4, 112, 116, 120, 124, 128, 52<br /><br />ROOT Object{1}ᐸ{result}ᐳ[53]<br />1: <br />ᐳ: Access[58], Access[59], Object[60]<br />2: PgSelect[57]<br />3: Connection[61]<br />4: ConnectionItems[63]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Parent side effect step: 44<br />Deps: 4, 61, 44, 63, 60, 112, 116, 120, 124, 128<br /><br />ROOT __ValueᐸrootValueᐳ[4]"):::bucket
    Bucket4("Bucket 4 (nullableBoundary)<br />Deps: 61, 44, 63, 60, 112, 116, 120, 124, 128<br /><br />ROOT Connection{2}ᐸ57ᐳ[61]"):::bucket
    Bucket6("Bucket 6 (listItem)<br />Deps: 44, 60, 112, 116, 120, 124, 128<br /><br />ROOT __Item{6}ᐸ63ᐳ[66]"):::bucket
    Bucket7("Bucket 7 (polymorphic)<br />__typename: Lambda[71]<br />Parent side effect step: 44<br />Deps: 71, 60, 68, 44, 112, 116, 120, 124, 128, 70"):::bucket
    Bucket8("Bucket 8 (polymorphicPartition)<br />|RelationalTopic<br />Parent side effect step: 44<br />Deps: 60, 68, 44, 112, 70<br />ᐳRelationalTopic<br /><br />1: PgSelect[73]<br />2: PgSelectRows[78]<br />ᐳ: 77, 79, 113, 114, 115"):::bucket
    Bucket9("Bucket 9 (polymorphicPartition)<br />|RelationalPost<br />Parent side effect step: 44<br />Deps: 60, 68, 44, 116, 70<br />ᐳRelationalPost<br /><br />1: PgSelect[81]<br />2: PgSelectRows[86]<br />ᐳ: 85, 87, 117, 118, 119"):::bucket
    Bucket10("Bucket 10 (polymorphicPartition)<br />|RelationalDivider<br />Parent side effect step: 44<br />Deps: 60, 68, 44, 120, 70<br />ᐳRelationalDivider<br /><br />1: PgSelect[89]<br />2: PgSelectRows[94]<br />ᐳ: 93, 95, 121, 122, 123"):::bucket
    Bucket11("Bucket 11 (polymorphicPartition)<br />|RelationalChecklist<br />Parent side effect step: 44<br />Deps: 60, 68, 44, 124, 70<br />ᐳRelationalChecklist<br /><br />1: PgSelect[97]<br />2: PgSelectRows[102]<br />ᐳ: 101, 103, 125, 126, 127"):::bucket
    Bucket12("Bucket 12 (polymorphicPartition)<br />|RelationalChecklistItem<br />Parent side effect step: 44<br />Deps: 60, 68, 44, 128, 70<br />ᐳRelationalChecklistItem<br /><br />1: PgSelect[105]<br />2: PgSelectRows[110]<br />ᐳ: 109, 111, 129, 130, 131"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3
    Bucket3 --> Bucket4
    Bucket4 --> Bucket6
    Bucket6 --> Bucket7
    Bucket7 --> Bucket8 & Bucket9 & Bucket10 & Bucket11 & Bucket12

    %% plan dependencies
    List32{{"List[32∈0] ➊<br />ᐸ15,19,23,27,31ᐳ"}}:::plan
    Object15{{"Object[15∈0] ➊<br />ᐸ{match,pks}ᐳ"}}:::plan
    Object19{{"Object[19∈0] ➊<br />ᐸ{match,pks}ᐳ"}}:::plan
    Object23{{"Object[23∈0] ➊<br />ᐸ{match,pks}ᐳ"}}:::plan
    Object27{{"Object[27∈0] ➊<br />ᐸ{match,pks}ᐳ"}}:::plan
    Object31{{"Object[31∈0] ➊<br />ᐸ{match,pks}ᐳ"}}:::plan
    Object15 & Object19 & Object23 & Object27 & Object31 --> List32
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ'WyJyZWxhdGlvbmFsX3RvcGljcyIsMV0='ᐳ[138]"}}:::plan
    Lambda13[["Lambda[13∈0] ➊"]]:::unbatchedplan
    List14{{"List[14∈0] ➊<br />ᐸ137ᐳ"}}:::plan
    Lambda13 & List14 --> Object15
    Lambda17[["Lambda[17∈0] ➊"]]:::unbatchedplan
    Lambda17 & List14 --> Object19
    Lambda21[["Lambda[21∈0] ➊"]]:::unbatchedplan
    Lambda21 & List14 --> Object23
    Lambda25[["Lambda[25∈0] ➊"]]:::unbatchedplan
    Lambda25 & List14 --> Object27
    Lambda29[["Lambda[29∈0] ➊"]]:::unbatchedplan
    Lambda29 & List14 --> Object31
    PgSelect35[["PgSelect[35∈0] ➊<br />ᐸrelational_itemsᐳ<br />More deps:<br />- Object[38]"]]:::plan
    Access34{{"Access[34∈0] ➊<br />ᐸ33.0ᐳ"}}:::plan
    Access34 --> PgSelect35
    Object38{{"Object[38∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ<br />Dependents: 2"}}:::plan
    Access36{{"Access[36∈0] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access37{{"Access[37∈0] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access36 & Access37 --> Object38
    Lambda9{{"Lambda[9∈0] ➊<br />ᐸdecodeNodeIdWithCodecsᐳ<br />More deps:<br />- Constantᐸ'WyJyZWxhdGlvbmFsX3RvcGljcyIsMV0='ᐳ[138]"}}:::plan
    Lambda9 --> Lambda13
    Access137{{"Access[137∈0] ➊<br />ᐸ9.base64JSON.1ᐳ"}}:::plan
    Access137 -->|rejectNull| List14
    Lambda9 --> Lambda17
    Lambda9 --> Lambda21
    Lambda9 --> Lambda25
    Lambda9 --> Lambda29
    Lambda33{{"Lambda[33∈0] ➊"}}:::plan
    List32 --> Lambda33
    Lambda33 --> Access34
    First39{{"First[39∈0] ➊"}}:::plan
    PgSelectRows40[["PgSelectRows[40∈0] ➊"]]:::plan
    PgSelectRows40 --> First39
    PgSelect35 --> PgSelectRows40
    PgSelectSingle41{{"PgSelectSingle[41∈0] ➊<br />ᐸrelational_itemsᐳ"}}:::plan
    First39 --> PgSelectSingle41
    PgClassExpression42{{"PgClassExpression[42∈0] ➊<br />ᐸ__relational_items__ᐳ"}}:::plan
    PgSelectSingle41 --> PgClassExpression42
    PgFromExpression48{{"PgFromExpression[48∈0] ➊"}}:::plan
    PgClassExpression42 -->|trapInhibited| PgFromExpression48
    ApplyInput54{{"ApplyInput[54∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput54
    Lambda9 --> Access137
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ<br />Dependents: 4"]:::plan
    PgSelect44[["PgSelect[44∈1] ➊<br />ᐸcustom_delete_relational_item(mutation)ᐳ<br />More deps:<br />- Object[38]"]]:::sideeffectplan
    PgFromExpression48 & ApplyInput54 --> PgSelect44
    First49{{"First[49∈1] ➊"}}:::plan
    PgSelectRows50[["PgSelectRows[50∈1] ➊"]]:::plan
    PgSelectRows50 --> First49
    PgSelect44 --> PgSelectRows50
    PgSelectSingle51{{"PgSelectSingle[51∈1] ➊<br />ᐸcustom_delete_relational_itemᐳ"}}:::plan
    First49 --> PgSelectSingle51
    PgClassExpression52{{"PgClassExpression[52∈1] ➊<br />ᐸ__custom_d...l_item__.vᐳ"}}:::plan
    PgSelectSingle51 --> PgClassExpression52
    Object53{{"Object[53∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgClassExpression52 --> Object53
    PgSelect57[["PgSelect[57∈2] ➊<br />ᐸrelational_itemsᐳ<br />More deps:<br />- Constantᐸ1ᐳ[139]"]]:::plan
    Object60{{"Object[60∈2] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Object60 --> PgSelect57
    Access58{{"Access[58∈2] ➊<br />ᐸ2.pgSettingsᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access59{{"Access[59∈2] ➊<br />ᐸ2.withPgClientᐳ<br />More deps:<br />- __Value[2]"}}:::plan
    Access58 & Access59 --> Object60
    Connection61[["Connection[61∈2] ➊<br />ᐸ57ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[139]"]]:::plan
    PgSelect57 --> Connection61
    ConnectionItems63[["ConnectionItems[63∈2] ➊"]]:::plan
    Connection61 --> ConnectionItems63
    __Item66[/"__Item[66∈6]<br />ᐸ63ᐳ"\]:::itemplan
    ConnectionItems63 ==> __Item66
    PgSelectSingle67{{"PgSelectSingle[67∈6]<br />ᐸrelational_itemsᐳ"}}:::plan
    __Item66 --> PgSelectSingle67
    PgClassExpression68{{"PgClassExpression[68∈6]<br />ᐸ__relation...ems__.”id”ᐳ"}}:::plan
    PgSelectSingle67 --> PgClassExpression68
    PgClassExpression70{{"PgClassExpression[70∈6]<br />ᐸ__relation...s__.”type”ᐳ"}}:::plan
    PgSelectSingle67 --> PgClassExpression70
    Lambda71{{"Lambda[71∈6]<br />ᐸRelationalItem_typeNameFromTypeᐳ"}}:::plan
    PgClassExpression70 --> Lambda71
    PgSelect73[["PgSelect[73∈8]<br />ᐸrelational_topicsᐳ<br />ᐳRelationalTopic"]]:::plan
    Object60 & PgClassExpression68 --> PgSelect73
    List114{{"List[114∈8]^<br />ᐸ112,113ᐳ<br />More deps:<br />- Constantᐸ'relational_topics'ᐳ[112]"}}:::plan
    PgClassExpression113{{"PgClassExpression[113∈8]^<br />ᐸ__relation...c_item_id”ᐳ"}}:::plan
    PgClassExpression113 --> List114
    First77{{"First[77∈8]^"}}:::plan
    PgSelectRows78[["PgSelectRows[78∈8]^"]]:::plan
    PgSelectRows78 --> First77
    PgSelect73 --> PgSelectRows78
    PgSelectSingle79{{"PgSelectSingle[79∈8]^<br />ᐸrelational_topicsᐳ"}}:::plan
    First77 --> PgSelectSingle79
    PgSelectSingle79 --> PgClassExpression113
    Lambda115{{"Lambda[115∈8]^<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List114 --> Lambda115
    PgSelect81[["PgSelect[81∈9]<br />ᐸrelational_postsᐳ<br />ᐳRelationalPost"]]:::plan
    Object60 & PgClassExpression68 --> PgSelect81
    List118{{"List[118∈9]^<br />ᐸ116,117ᐳ<br />More deps:<br />- Constantᐸ'relational_posts'ᐳ[116]"}}:::plan
    PgClassExpression117{{"PgClassExpression[117∈9]^<br />ᐸ__relation...t_item_id”ᐳ"}}:::plan
    PgClassExpression117 --> List118
    First85{{"First[85∈9]^"}}:::plan
    PgSelectRows86[["PgSelectRows[86∈9]^"]]:::plan
    PgSelectRows86 --> First85
    PgSelect81 --> PgSelectRows86
    PgSelectSingle87{{"PgSelectSingle[87∈9]^<br />ᐸrelational_postsᐳ"}}:::plan
    First85 --> PgSelectSingle87
    PgSelectSingle87 --> PgClassExpression117
    Lambda119{{"Lambda[119∈9]^<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List118 --> Lambda119
    PgSelect89[["PgSelect[89∈10]<br />ᐸrelational_dividersᐳ<br />ᐳRelationalDivider"]]:::plan
    Object60 & PgClassExpression68 --> PgSelect89
    List122{{"List[122∈10]^<br />ᐸ120,121ᐳ<br />More deps:<br />- Constantᐸ'relational_dividers'ᐳ[120]"}}:::plan
    PgClassExpression121{{"PgClassExpression[121∈10]^<br />ᐸ__relation...r_item_id”ᐳ"}}:::plan
    PgClassExpression121 --> List122
    First93{{"First[93∈10]^"}}:::plan
    PgSelectRows94[["PgSelectRows[94∈10]^"]]:::plan
    PgSelectRows94 --> First93
    PgSelect89 --> PgSelectRows94
    PgSelectSingle95{{"PgSelectSingle[95∈10]^<br />ᐸrelational_dividersᐳ"}}:::plan
    First93 --> PgSelectSingle95
    PgSelectSingle95 --> PgClassExpression121
    Lambda123{{"Lambda[123∈10]^<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List122 --> Lambda123
    PgSelect97[["PgSelect[97∈11]<br />ᐸrelational_checklistsᐳ<br />ᐳRelationalChecklist"]]:::plan
    Object60 & PgClassExpression68 --> PgSelect97
    List126{{"List[126∈11]^<br />ᐸ124,125ᐳ<br />More deps:<br />- Constantᐸ'relational_checklists'ᐳ[124]"}}:::plan
    PgClassExpression125{{"PgClassExpression[125∈11]^<br />ᐸ__relation...t_item_id”ᐳ"}}:::plan
    PgClassExpression125 --> List126
    First101{{"First[101∈11]^"}}:::plan
    PgSelectRows102[["PgSelectRows[102∈11]^"]]:::plan
    PgSelectRows102 --> First101
    PgSelect97 --> PgSelectRows102
    PgSelectSingle103{{"PgSelectSingle[103∈11]^<br />ᐸrelational_checklistsᐳ"}}:::plan
    First101 --> PgSelectSingle103
    PgSelectSingle103 --> PgClassExpression125
    Lambda127{{"Lambda[127∈11]^<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List126 --> Lambda127
    PgSelect105[["PgSelect[105∈12]<br />ᐸrelational_checklist_itemsᐳ<br />ᐳRelationalChecklistItem"]]:::plan
    Object60 & PgClassExpression68 --> PgSelect105
    List130{{"List[130∈12]^<br />ᐸ128,129ᐳ<br />More deps:<br />- Constantᐸ'relational_checklist_items'ᐳ[128]"}}:::plan
    PgClassExpression129{{"PgClassExpression[129∈12]^<br />ᐸ__relation...m_item_id”ᐳ"}}:::plan
    PgClassExpression129 --> List130
    First109{{"First[109∈12]^"}}:::plan
    PgSelectRows110[["PgSelectRows[110∈12]^"]]:::plan
    PgSelectRows110 --> First109
    PgSelect105 --> PgSelectRows110
    PgSelectSingle111{{"PgSelectSingle[111∈12]^<br />ᐸrelational_checklist_itemsᐳ"}}:::plan
    First109 --> PgSelectSingle111
    PgSelectSingle111 --> PgClassExpression129
    Lambda131{{"Lambda[131∈12]^<br />ᐸbase64JSONEncodeᐳ"}}:::plan
    List130 --> Lambda131

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,Lambda9,Lambda13,List14,Object15,Lambda17,Object19,Lambda21,Object23,Lambda25,Object27,Lambda29,Object31,List32,Lambda33,Access34,PgSelect35,Access36,Access37,Object38,First39,PgSelectRows40,PgSelectSingle41,PgClassExpression42,PgFromExpression48,ApplyInput54,Access137 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgSelect44,First49,PgSelectRows50,PgSelectSingle51,PgClassExpression52,Object53 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PgSelect57,Access58,Access59,Object60,Connection61,ConnectionItems63 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3 bucket3
    classDef bucket4 stroke:#0000ff
    class Bucket4 bucket4
    classDef bucket6 stroke:#ff1493
    class Bucket6,__Item66,PgSelectSingle67,PgClassExpression68,PgClassExpression70,Lambda71 bucket6
    classDef bucket7 stroke:#808000
    class Bucket7 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,PgSelect73,First77,PgSelectRows78,PgSelectSingle79,PgClassExpression113,List114,Lambda115 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,PgSelect81,First85,PgSelectRows86,PgSelectSingle87,PgClassExpression117,List118,Lambda119 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgSelect89,First93,PgSelectRows94,PgSelectSingle95,PgClassExpression121,List122,Lambda123 bucket10
    classDef bucket11 stroke:#00ffff
    class Bucket11,PgSelect97,First101,PgSelectRows102,PgSelectSingle103,PgClassExpression125,List126,Lambda127 bucket11
    classDef bucket12 stroke:#4169e1
    class Bucket12,PgSelect105,First109,PgSelectRows110,PgSelectSingle111,PgClassExpression129,List130,Lambda131 bucket12

    %% implicit side effects
    PgSelect44 -.-o Access58
    PgSelect44 -.-o Access59

